import { Module } from '@nestjs/common'
import { TypeOrmModule } from '@nestjs/typeorm'

import { SseService } from '~/modules/sse/sse.service'

import { DeviceController } from './device.controller'
import { DeviceEntity } from './device.entity'
import { DeviceService } from './device.service'
import { DeviceAttrEntity } from './deviceAttr.entity'

const providers = [DeviceService, SseService]

@Module({
  imports: [
    TypeOrmModule.forFeature([DeviceEntity, DeviceAttrEntity]),
  ],
  controllers: [DeviceController],
  providers: [...providers],
  exports: [TypeOrmModule, ...providers],
})
export class DeviceModule {}
